package spring.study.annotation.bean;

import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Value;

/**
 * @author study
 * @version 1.0
 * @date 2020/6/18 22:04
 */
@AllArgsConstructor
@Accessors(chain = true)
@ToString
public class Person {
    //赋值
    @Value("张三")
    private String name;
    // SpEL表达式
    @Value("#{20-2}")
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
